Refactor viz code + transform keypoints + integrated keypoint viz code#273
Open
Refactor viz code + transform keypoints + integrated keypoint viz code#273
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7283cfa to
e7875d3
Compare
e7875d3 to
ad3509c
Compare
ad3509c to
e7875d3
Compare
e7875d3 to
cf7f480
Compare
cf7f480 to
f9e76cd
Compare
SimarKareer
requested changes
Mar 17, 2026
Comment on lines
+425
to
+426
| Reshape( | ||
| input_key=left_keypoints_action_headframe, |
Collaborator
There was a problem hiding this comment.
Can you allow reshape to take in a list of reshapes to do. smth like
Reshape(
[(input_key, output_key, shape), (input_key2, output_key2, shape2)]
)
| def viz_transformed_batch( | ||
| cls, | ||
| batch, | ||
| mode=Literal["traj", "axes", "keypoints"], |
Collaborator
There was a problem hiding this comment.
what is this literal thing?
| cls, | ||
| images, | ||
| actions, | ||
| mode=Literal["traj", "axes", "keypoints"], |
| batch[key] = batch[key].clone() | ||
| else: | ||
| raise ValueError(f"NumpyToTensor expects key '{key}' to be a numpy array or torch tensor, got {type(batch[key])}") | ||
| raise ValueError( |
Collaborator
There was a problem hiding this comment.
fix formatting diff, did you run ruff in precommit?
| if self.transform: | ||
| for transform in self.transform or []: | ||
| try: | ||
| # breakpoint() |
| data = transform.transform(data) | ||
| except Exception as e: | ||
| logger.error(f"Error transforming data: {e}") | ||
| logger.error(f"Data: {data}") |
Collaborator
There was a problem hiding this comment.
Why'd you get rid of this?
SimarKareer
requested changes
Mar 17, 2026
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", |
Collaborator
There was a problem hiding this comment.
Update the keypoint viz in this notebook to use your new functions
SimarKareer
requested changes
Mar 17, 2026
| @@ -0,0 +1,420 @@ | |||
| { | |||
| "cells": [ | |||
Collaborator
There was a problem hiding this comment.
- Make sure this notebook runs
- Update it to use your new viz code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.